/*eslint-disable*/
// 路由导航配置

import { Navigation } from 'react-native-navigation';
import App from '../../App';
import Login from '../screen/Login';
import My from '../screen/My';
import GoCircle from '../screen/GoCircle';
import GoHealth from '../screen/GoHealth';
import GoRun from '../screen/GoRun';
import GoStrore from '../screen/GoStrore';
import InputAuthCode from '../screen/InputAuthCode';
import Introduction from '../screen/Introduction';



// 注册所有路由
Navigation.registerComponent('App', () => App);
Navigation.registerComponent('Login', () => Login);
Navigation.registerComponent('My', () => My);
Navigation.registerComponent('GoCircle', () => GoCircle);
Navigation.registerComponent('GoHealth', () => GoHealth);
Navigation.registerComponent('GoRun', () => GoRun);
Navigation.registerComponent('GoStrore', () => GoStrore);
Navigation.registerComponent('InputAuthCode', () => InputAuthCode);
Navigation.registerComponent('Introduction', () => Introduction);

// 栈stack的导航：setRoot(),如引导页，登陆页，主屏幕
// 1. 欢迎屏幕的导航配置 
export const WelcomeScreen = {
  root: {
    stack: {
      id: 'WelcomeScreen',
      children: [
        {
          component: {
            name: 'Introduction',
          },
        },
      ],
    },
  },
}

// 2.登陆屏幕的导航配置 
export const LoginPage = {
  root: {
    stack: {
      id: 'Login',
      children: [
        {
          component: {
            name: 'Login',
          },
        },
      ],
    },
  },
}

// 3.主屏幕，导航路由的配置信息（页面布局）
export const MainRoot = {
  root: {
    bottomTabs: {
      id: 'Bootom_Labs_Layout',
      children: [
        {
          stack: {
            id: 'Home_Tab',
            children: [
              {
                component: {
                  id: 'Go_Circle_Screen',
                  name: 'GoCircle'
                }
              }
            ],
            options: {
              bottomTab: {
                text: 'GO圈',
                icon: require('../assets/bottomTabs/go.png'),
                selectedIcon: require('../assets/bottomTabs/go_active.png'),
              }
            }
          }
        },
        {
          stack: {
            id: 'Health_Tab',
            children: [
              {
                component: {
                  id: 'Go_Health_Screen',
                  name: 'GoHealth'
                }
              }
            ],
            options: {
              bottomTab: {
                text: '健康',
                icon: require('../assets/bottomTabs/go.png'),
                selectedIcon: require('../assets/bottomTabs/go_active.png'),
              }
            }
          }
        },
        {
          stack: {
            id: 'Run_Tab',
            children: [
              {
                component: {
                  id: 'Go_Run_Screen',
                  name: 'GoRun'
                }
              }
            ],
            options: {
              bottomTab: {
                text: '运动',
                icon: require('../assets/bottomTabs/go.png'),
                selectedIcon: require('../assets/bottomTabs/go_active.png'),
              }
            }
          }
        },
        {
          stack: {
            id: 'Strore_Tab',
            children: [
              {
                component: {
                  id: 'Go_Strore_Screen',
                  name: 'GoStrore'
                }
              }
            ],
            options: {
              bottomTab: {
                text: '商城',
                icon: require('../assets/bottomTabs/go.png'),
                selectedIcon: require('../assets/bottomTabs/go_active.png'),
              }
            }
          }
        },
        {
          stack: {
            id: 'My_Tab',
            children: [
              {
                component: {
                  id: 'My_Screen',
                  name: 'My'
                }
              }
            ],
            options: {
              bottomTab: {
                text: '我的',
                icon: require('../assets/bottomTabs/go.png'),
                selectedIcon: require('../assets/bottomTabs/go_active.png'),
              }
            }
          }
        }
      ]
    }
  }
}

// 4. 默认的导航栏样式
Navigation.setDefaultOptions({
  bottomTabs: { // app底部整体tabs配置,背景色...
    titleDisplayMode: 'alwaysShow'
  },
  statusBar: { // 手机顶部状态栏,电量，时间，wife....
    backgroundColor: 'rgb(255,255,255.0.85)',
    style: 'dark',
    visible: true  // 是否显示手机顶部状态栏
  },
  topBar: { // app头部
    title: {
      color: 'black'
    },
    backButton: {  // 返回按钮颜色
      color: '#666666'
    },
    background:{
      color: '#ffffff'
    }
  },
  bottomTab: { // app底部单独tab配置,
    fontSize: 12,
    selectedFontSize: 12,
    iconWidth: 20,
    iconHeight: 20,
    // textColor: '#666',
    // selectedTextColor: '#0099FF',
  }
})